nethackfandomcom-20200214-history
Source:NetHack 3.2.0/youprop.h
Below is the full text to youprop.h from the source code of NetHack 3.2.0. To link to a particular line, write [[NetHack 3.2.0/youprop.h#line123]], for example. Warning! This is the source code from an old release. For the latest release, see Source code 1. /* SCCS Id: @(#)youprop.h 3.2 96/03/28 */ 2. /* Copyright © 1989 Mike Threepoint */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef YOUPROP_H 6. #define YOUPROP_H 7. 8. #ifndef PROP_H 9. #include "prop.h" 10. #endif 11. #ifndef PERMONST_H 12. #include "permonst.h" 13. #endif 14. #ifndef MONDATA_H 15. #include "mondata.h" 16. #endif 17. #ifndef PM_H 18. #include "pm.h" 19. #endif 20. 21. #define maybe_polyd(if_so,if_not) (Upolyd ? (if_so) : (if_not)) 22. 23. /* three pseudo-properties */ 24. #define Blindfolded (ublindf) 25. #define Punished (uball) 26. #define Underwater (u.uinwater) 27. /* Note that Underwater and u.uinwater are both used in code. 28. The latter form is for later implementation of other in-water 29. states, like swimming, wading, etc. */ 30. 31. #define HFire_resistance u.upropsFIRE_RES.p_flgs 32. #define Fire_resistance (HFire_resistance || resists_fire(&youmonst)) 33. 34. #define HCold_resistance u.upropsCOLD_RES.p_flgs 35. #define Cold_resistance (HCold_resistance || resists_cold(&youmonst)) 36. 37. #define HSleep_resistance u.upropsSLEEP_RES.p_flgs 38. #define Sleep_resistance (HSleep_resistance || resists_sleep(&youmonst)) 39. 40. #define HDisint_resistance u.upropsDISINT_RES.p_flgs 41. #define Disint_resistance (HDisint_resistance || resists_disint(&youmonst)) 42. 43. #define HShock_resistance u.upropsSHOCK_RES.p_flgs 44. #define Shock_resistance (HShock_resistance || resists_elec(&youmonst)) 45. 46. #define HPoison_resistance u.upropsPOISON_RES.p_flgs 47. #define Poison_resistance (HPoison_resistance || resists_poison(&youmonst)) 48. 49. #define Adornment u.upropsADORNED.p_flgs 50. 51. #define HRegeneration u.upropsREGENERATION.p_flgs 52. #define Regeneration (HRegeneration || regenerates(uasmon)) 53. 54. #define Searching u.upropsSEARCHING.p_flgs 55. 56. #define HSee_invisible u.upropsSEE_INVIS.p_flgs 57. #define See_invisible (HSee_invisible || perceives(uasmon)) 58. 59. #define HInvis u.upropsINVIS.p_flgs 60. #define Invis ((HInvis || pm_invisible(uasmon)) && \ 61. !(HInvis & I_BLOCKED)) 62. #define Invisible (Invis && !See_invisible) 63. 64. #define HTeleportation u.upropsTELEPORT.p_flgs 65. #define Teleportation (HTeleportation || can_teleport(uasmon)) 66. 67. #define HTeleport_control u.upropsTELEPORT_CONTROL.p_flgs 68. #define Teleport_control (HTeleport_control || control_teleport(uasmon)) 69. 70. #define Polymorph u.upropsPOLYMORPH.p_flgs 71. #define Polymorph_control u.upropsPOLYMORPH_CONTROL.p_flgs 72. 73. #define HLevitation u.upropsLEVITATION.p_flgs 74. #define Levitation (HLevitation || is_floater(uasmon)) 75. 76. #define Stealth u.upropsSTEALTH.p_flgs 77. #define Aggravate_monster u.upropsAGGRAVATE_MONSTER.p_flgs 78. #define Conflict u.upropsCONFLICT.p_flgs 79. #define Protection u.upropsPROTECTION.p_flgs 80. #define Protection_from_shape_changers \ 81. u.upropsPROT_FROM_SHAPE_CHANGERS.p_flgs 82. #define Warning u.upropsWARNING.p_flgs 83. 84. #define HTelepat u.upropsTELEPAT.p_flgs 85. #define Telepat (HTelepat || telepathic(uasmon)) 86. 87. #define Fast u.upropsFAST.p_flgs 88. 89. #define HStun u.upropsSTUNNED.p_flgs 90. #define Stunned (HStun || u.usym S_BAT || u.usym S_STALKER) 91. 92. #define HConfusion u.upropsCONFUSION.p_flgs 93. #define Confusion HConfusion 94. 95. #define Sick u.upropsSICK.p_flgs 96. #define Blinded u.upropsBLINDED.p_flgs 97. #define Blind (Blinded || Blindfolded || !haseyes(uasmon)) 98. #define Sleeping u.upropsSLEEPING.p_flgs 99. #define Wounded_legs u.upropsWOUNDED_LEGS.p_flgs 100. #define Stoned u.upropsSTONED.p_flgs 101. #define Strangled u.upropsSTRANGLED.p_flgs 102. #define HHallucination u.upropsHALLUC.p_flgs 103. #define HHalluc_resistance u.upropsHALLUC_RES.p_flgs 104. #define Hallucination (HHallucination && !HHalluc_resistance) 105. #define Fumbling u.upropsFUMBLING.p_flgs 106. #define Jumping u.upropsJUMPING.p_flgs 107. /* Wwalking is meaningless on water level */ 108. #define Wwalking (u.upropsWWALKING.p_flgs && \ 109. !Is_waterlevel(&u.uz)) 110. #define Hunger u.upropsHUNGER.p_flgs 111. #define Glib u.upropsGLIB.p_flgs 112. #define Reflecting u.upropsREFLECTING.p_flgs 113. #define Lifesaved u.upropsLIFESAVED.p_flgs 114. #define HAntimagic u.upropsANTIMAGIC.p_flgs 115. #define Antimagic (HAntimagic || \ 116. (Upolyd && resists_magm(&youmonst))) 117. #define Displaced u.upropsDISPLACED.p_flgs 118. #define HClairvoyant u.upropsCLAIRVOYANT.p_flgs 119. #define Clairvoyant (HClairvoyant && !(HClairvoyant & I_BLOCKED)) 120. #define Vomiting u.upropsVOMITING.p_flgs 121. #define Energy_regeneration u.upropsENERGY_REGENERATION.p_flgs 122. #define HMagical_breathing u.upropsMAGICAL_BREATHING.p_flgs 123. #define Amphibious (HMagical_breathing || amphibious(uasmon)) 124. #define Breathless (HMagical_breathing || breathless(uasmon)) 125. #define Half_spell_damage u.upropsHALF_SPDAM.p_flgs 126. #define Half_physical_damage u.upropsHALF_PHDAM.p_flgs 127. 128. #endif /* YOUPROP_H */ youprop.h